<#include "common-js.html"/>
<div class="bg-image">
<#if pattern=="dev">
<div>当前处于开发模式</div>
<#else >
<div>当前处于生产模式</
>
</#if>
<h1>用户信息</h1>
<div>
    <input type="text" id="queryId">
    <input type="button" value="查询" id="query">
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <table class="table table-bordered">
                <caption>用户信息</caption>
                <thead></thead>
                <tbody>
                <tr>
                    <th>id</th>
                    <th>name</th>
                </tr>
                <tr>
                    <td id="id"></td>
                    <td id="name"></td>
                </tr>
                </tbody>
                <tfoot></tfoot>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">
    require(["demo"], function (demo) {
        $("#query").off("click").on("click", function () {
            var param = {"id": $("#queryId").val()};
            demo.queryUser(param, function (response) {
                $("#id").text(response.data.id);
                $("#name").text(response.data.name);
            });
        });
    });
</script>
</div>